Image processing apparatus and image processing program

ABSTRACT

An image processing apparatus includes a first display unit which displays a material image and an original image in fast and second areas on a display device, respectively; a detection unit which detects a position on the display device designated from an outside; a relationship determining unit which determines a designated position in the first area and a designated position in the second areas and which determines a correspondence relationship between the first area and the second area based on the designated positions; an allocation region determining unit which determines an allocation region in the second area; a cut region determining unit which determines a cut region in the first area to correspond to the allocation region based on the correspondence relationship; and a second display unit which displays a partial image corresponding to the cut region in the allocation region to display a combined image.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority from Japanese Patent Application No.2008-092150, filed on Mar. 31, 2008, the entire subject matter of whichis incorporated herein by reference.

TECHNICAL FIELD

Aspects of the present invention relate to an image processing apparatusand an image processing program.

BACKGROUND

A device has a media print function of directly printing out image dataphotographed by a digital camera and the like stored in a memory card bymounting the memory card in a slot provided in the device, without usinga personal computer. A device is configured such that image data readfrom the memory card can be previewed on a display panel.

Further, a photographing apparatus, which is installed in an amusementfacility and the like, automatically photographs a user in a set photobooth and prints a photographed image on print media, such as a seal,and then provides the seal to the user.

For example, JP-A-2007-181163 describes a photographing apparatusincluding an image arranging unit that arranges a fire image on theentire photographed image so as to overlap and an image detecting unitthat deletes at least a part of the frame image arranged by the imagearranging unit so that a user can edit the photographed image accordingto the user's preference.

However, in the apparatus described in JP-A-2007-181163, thephotographed image and the frame image are displayed in a state of beingcombined in advance, and the user performs editing while viewing thecombined state. Accordingly, for example, when the user wants to add anedit image little by little without breaking the atmosphere of theoriginal photographed image, it becomes difficult to see the originalphotographed image itself.

SUMMARY

Exemplary embodiments of the present invention address the abovedisadvantages and other disadvantages not described above. However, thepresent invention is not required to overcome the disadvantagesdescribed above, and thus, an exemplary embodiment of the presentinvention may not overcome any of the problems described above.

Accordingly, it is an aspect of the present invention to provide animage processing apparatus and an image processing program allowing auser to edit a desired combined image with a simple operation.

According to an exemplary embodiment of the present Invention, there isprovided an image processing apparatus comprising: a first display unitwhich displays a material image in a first area on a display device anddisplays an original image in a second area on the display device; adetection unit which detects a position on the display device designatedfrom an outside; a relationship determining unit which sets a designatedposition in the first area detected by the detection unit as a firstreference position, and sets a designated position in the second areadetected by the detection unit as a second reference position, and whichdetermines a correspondence relationship between each position in thefirst area and each position in the second area such that the firstreference position and the second reference position correspond to eachother; an allocation region determining unit which determines anallocation region in the second area based on a detection result of thedetection unit; a cut region determining unit which determines a cutregion in the first area to correspond to the allocation regiondetermined by the allocation region determining unit, based on thecorrespondence relationship determined by the relationship determiningunit; and a second display unit which displays a partial image cut fromthe material image based on the cut region determined by the cut regiondetermining unit. In the allocation region determined by the allocationregion determining unit to display a combined image.

According to another exemplary embodiment of the present invention,there is provided a computer-readable medium having a computer programstored thereon and readable by a computer including a detection unitwhich detects a position on a display device designated from an outside,the computer program, when executed by the computer, causing thecomputer to perform operations comprising: displaying a material imagein a first area on the display device, and displaying an original imagein a second area on the display device; setting a designated position inthe first area detected by the detection unit as a first referenceposition, and setting a designated position in the second area detectedby the detection unit as a second reference position; determining acorrespondence relationship between each position in the first area andeach position in the second area such that the first reference positionand the second reference position correspond to each other; determiningan allocation region in the second area based on a detection result ofthe detection unit; determines a cut region in the first area tocorrespond to the allocation region based on the correspondencerelationship; and displaying a partial image cut from the material imagebased on the cut region, in the allocation region to display a combinedimage.

According to the above configuration, a user can designate an arbitraryposition of the first area and an arbitrary position of the second areaas reference positions and can determine the correspondence relationshipbetween each position of the first area and each position of the secondarea such that the reference position of the first area and thereference position of the second area correspond to each other. When anallocation region in the second area is determined on the basis of auser's operation on the second area, the cut region of the first areacorresponding to the allocation region is determined. In addition, apartial image cut on the basis of the cut region is displayed in theallocation region of the second area. Therefore, an effect that the usercan edit a combined image with a simple operation is obtained.

For example, the user can edit a desired combined image, in which adesired partial image cut from the material image is displayed in anallocation region of the original image, with a simple operation ofdesignating one point of the first area, at which the partial image thatthe user wants to draw in the allocation region is displayed, as areference position and designating one point of the second area, atwhich the user wants to provide the allocation region, as a referenceposition and then determining as the allocation region the neighborhoodof the reference position designated previously in the second area.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects of the present invention will become moreapparent and more readily appreciated from the following description ofexemplary embodiments of the present invention taken in conjunction withthe attached drawings, in which:

FIG. 1 is a perspective view showing the configuration of outerappearance of an MFP according to an exemplary embodiment of the presentinvention;

FIG. 2 is a block diagram showing the electrical configuration of theMFP;

FIGS. 3A to 3D are views showing an edit screen displayed on an LCD anda user's operation performed on the screen;

FIG. 4A is a view schematically showing a first frame, a second frame, athird frame, and a fourth frame, and FIG. 4B is a view showing an imagedisplayed on the LCD by overlapping of the first to fourth frames.

FIG. 5 is a flow chart showing editing processing executed by the MFP;

FIG. 6 is a flow chart showing relationship determination processing;

FIG. 7 is a flow chart showing combining processing;

FIG. 8 is a flow chart showing move processing;

FIG. 9A is a view showing a state before the position of an allocationregion is changed, and FIG. 9B is a view showing a state after theposition of an allocation region is changed;

FIG. 10 is a flow chart showing relationship determination processingaccording to a first modified embodiment;

FIGS. 11A to 11F are views showing an example of a screen displayed onthe LCD in the relationship determination processing according to thefirst modified embodiment;

FIG. 12 is a flow chart showing move processing according to a secondmodified embodiment;

FIGS. 13A to 13C are views showing an example of a screen displayed onthe LCD in the move processing according to the second modifiedembodiment;

FIG. 14 is a flow chart showing move processing according to a thirdmodified embodiment;

FIGS. 15A to 15C are views showing an example of a screen displayed onthe LCD in the move processing according to the third modifiedembodiment;

FIG. 16 is a flow chart showing combining processing according to afourth modified embodiment; and

FIGS. 17A to 17F are views showing an example of a screen displayed onthe LCD in the combining processing according to the fourth modifiedembodiment.

DETAILED DESCRIPTION

Hereinafter, exemplary embodiments of the present invention will bedescribed with reference to the accompanying drawings. FIG. 1 is aperspective view showing the configuration of outer appearance of amulti function peripheral (hereinafter, referred to as an MFP) 1according to an exemplary embodiment of the present invention. The MFP 1is a multi function peripheral having various functions, such as a photocapture function, a copy function, a facsimile function, and a scannerfunction.

In particular, the MFP 1 according to the present exemplary embodimentis configured such that a user can edit a desired combined image inwhich an original image and a material image are combined, with a simpleoperation, which will be described in detail later. Herein, the originalimage may be a photograph, a pattern, a figure and the like. Thematerial image may be a photograph, pattern, and the like or aphotograph date of the original image, and may include a character. Thecharacter may include any character defined by a character code and mayinclude not only a character for expression a language but also a symboland a figure.

A scanner 2 for reading a document in executing a facsimile function, ascanner function, or a copy function is provided at an upper portion ofthe MFP 1. In addition, a printer 3 which is a so-called ink jet printeris provided, as an apparatus that prints an image on recording sheet, inthe MFP 1.

The memory card slot 6 is provided on a front surface of the MFP 1.Image data read by the scanner function is stored in a memory cardmounted in the memory card slot 6, or original image data is read fromthe memory card mounted in the memory card slot 6 by the photo capturefunction and is then displayed on the LCD 5 or printed on a recordingsheet.

In addition, a horizontally long operation panel 4 is provided in frontof the document cover. An operation key 40, the LCD 5, and a touch panel7 (refer to FIG. 2) are provided on the operation panel 4. The MEP Idisplays, on the LCD 5, an operation procedure or a state of processingbeing executed while displaying information corresponding to anoperation of the operation key 40 or the touch panel 7.

The touch panel 7 is a kind of input device and is provided on a screenof the LCD 5. When a user designates (touches) the LCD 5 with a finger,the touch panel 7 can detect the designated position as a positiondesignated from the outside to the LCD 5.

Next, an electrical configuration of the MFP I will be described withreference to FIG. 2. The MFP 1 mainly includes a central processing unit(CPU) 11, an electronically erasable and programmable read only memory(EEPROM) 12, a random access memory (RAM) 13, the scanner 2, the printer3, the LCD 5, the memory card slot 6, the touch panel 7, an NCU 23, amodem 24, and the operation key 40.

Among those described above, the CPU 11, the EFPROM 12, and the RAM 13are connected to one another through a bus line 26. In addition, thescanner 2, the printer 3, the LCD 5, the memory card slot 6, the touchpanel 7, the NCU 23, the modem 24, the bus line 26, and the operationkey 40 are connected to one another through an input/output port 27.

The CPU 11 controls each function that the MFP 1 has or each portionconnected with the input/output port 27 according to a fixed value orprogram stored in the EEPROM 12 or the RAM 13 or various signalstransmitted and received through the NCU 23.

The EEPROM 12 is a nonvolatile memory capable of storing, for example,fixed value data or a control program 12 a executed by the CPU 11 sothat the fixed value data or the control program 12 a can be rewrittenand of holding the content even after the power is off. The controlprogram 12 a includes a program of flow charts shown in FIGS. 5 to 9B,which will be described later.

The RAM 13 is a memory for temporarily storing various kinds of datawhen executing various operations of the MFP 1. The RAM 13 includes avideo memory 13 a, a first frame buffer 13 b, a second frame buffer 13c, a third frame buffer 13 d, a fourth frame buffer 13 e, a mode memory13 f, a reference position memory 13 g, and a correspondencerelationship memory 13 h.

The video memory 13 a stores the content displayed on the LCD 5. Datawritten in the video memory 13 a is formed by combination of data(frames) stored in the first fame buffer 13 b, the second frame buffer13 c, the third frame buffer 13 d, and the fourth frame buffer 13 e. Thecontent of the data stored in the video memory 13 a and the first tofourth frame buffers 13 b to 13 e will be described later with referenceto FIGS. 4A and 4B.

The mode memory 13 f stores which one of a scratch mode, in which imagesare combined, and a move mode, in which a combined portion is moved, iscurrently set. The scratch mode and the move mode will be describedlater with reference to FIGS. 3A to 9B. In addition, the user can seteither the scratch mode or the move mode, for example, by inputting aninstruction from the operation panel 4.

The reference position memory 13 g stores reference positions B₁ and B₂determined for a right screen 43 and a left screen 44, respectively,which will be described later with reference to FIGS. 3A to 3D. Thecorrespondence relationship memory 13 h stores the correspondencerelationship between coordinate information on the right screen 43 andcoordinate information on the left screen 44. The reference positionsand the correspondence relationship will be described later withreference to FIGS. 3A to 4B.

The NCU 23 is connected to a telephone network (not shown) and controlstransmission of a dial signal to the telephone network, response of acall signal from the telephone network, and the like. The modem 24modulates image data, transmission of which is instructed by thefacsimile function, to a signal, which can be transmitted to thetelephone network, and transmits the signal through the NCU 23. Themodem 24 receives a signal, which is input through the NCU 23 from thetelephone network, and displays the signal on the LCD 5 or demodulatesthe signal to image data recordable by the printer 3.

Next, an edit screen displayed on the LCD 5 of the MFP 1 and a user'soperation performed on the screen will be described. As shown in FIGS.3A to 3D, the MFP 1 first displays an original image 41 based onoriginal image data read from a memory card in a right-half area 43(hereinafter, referred to as a right screen 43) of a display area of theLCD 5. Then, a material image 42 is displayed in a left-half area 44(hereinafter, referred to as a left screen 44) of the display area ofthe LCD 5. The right screen 43 and the left screen 44 have the sameshape and size.

In the present exemplary embodiment the right screen 43 and the leftscreen 44 are managed using common coordinate information by convertingthe positional information output from the touch panel 7. Specifically,the coordinate system having an X axis in the horizontal direction and aY axis in the vertical direction are set in a state where a lower leftcorner of each of the right screen 43 and the left screen 44 is set asan origin, and each position on the screen is managed by coordinateinformation including an x coordinate and a y coordinate.

The user's operation on the screen configured as above will now bedescribed. First, the user designates a reference position on each ofthe right screen 43 and the left screen 44. FIGS. 3A and 3B are viewsshowing an example of an operation of designating a reference position.

First, as shown in FIG. 3A, the user designates (touches) an arbitraryposition on the left screen 44. Since coordinate information indicatingthe designated position can be acquired from a detection result of thetouch panel 7, the MEP 1 determines the coordinate information as thereference position 31 of the left screen 44 and stores the coordinateinformation in the reference position memory 13 g (refer to FIG. 2). Inaddition, when the reference position B₁ of the left screen 44 isdetermined, the MEP 1 displays a pointer image P₁ at the referenceposition B₁ (refer to FIG. 3B).

Then, as shown in FIG. 3B, the user designates an arbitrary position onthe right screen 43. Similar to the left screen 44, the MFP 1 determinesthe coordinate information, which indicates the designated position onthe right screen 43, as the reference position B₂ of the right screen 43and stores the coordinate information in the reference position memory13 g (refer to FIG. 2). In addition, a pointer image P₂ is displayed atthe reference position B₂.

FIG. 3C is a view showing a state where the reference positions B₁ andB₂ are determined for the left screen 44 and the right screen 43,respectively. Although the processing will be described in detail later,the MFP 1 determines a difference between the coordinate information onthe reference position B₁ of the left screen 44 and the coordinateinformation on the reference position B₂ of the right screen 43 as thecorrespondence relationship between the left screen 44 and the rightscreen 43 and stores the correspondence relationship in thecorrespondence relationship memory 13 h.

FIG. 3D is a view showing an example of a user's operation ofdetermining an allocation region 45. As shown in FIG. 3D, when the userdesignates the right screen 43 after determination of the correspondencerelationship, the MFP 1 determines a region, which is obtained by addinga predetermined width to the position designated by the user, as theallocation region 45. For example, when the user moves a finger on thefight screen 43 in the way of a scratch operation, the designatedpositions are continuously detected. As a result, the designatedpositions form a linear locus. Since a predetermined width is added tothe locus, the user can easily designate the allocation region 45.

Then, the MFP 1 determines a cut region 46 of the left screen 44corresponding to the allocation region 45. Here, the cut region 46corresponding to the allocation region 45 is determined on the basis ofthe correspondence relationship between the left screen 44 and the rightscreen 43 stored in the correspondence relationship memory 13 h, anddetails of the processing will be described later with reference to FIG.6.

Then, a combined image is displayed on the right screen 43 by displayingthe material image 42 (that is, a portion of the material image 42displayed in the cut region 46), which is cut on the basis of the cutregion 46, as a partial image in the allocation region 45. In FIG. 3D,the cut region 46 is shown in a dashed-dotted line in order to make thedrawing easily understood. However, the dashed-dotted line may not bedisplayed on the screen.

As described above, when the user moves a finger or the like on thescreen, the designated position detected by the touch panel 7 moves. Inthis case, the MFP 1 sequentially updates and enlarges the allocationregion 45 by adding a predetermined width such that the locus of thedesignated position is included whenever the movement of the designatedposition is detected. Whenever the allocation region 45 is updated,display of the combined image is updated on the basis of the updatedallocation region 45.

Thus, according to the MFP 1, the user can edit the combined image witha simple operation. For example, the user designates one point on theleft screen 44, at which a partial image that the user wants to draw inthe allocation region 45 is displayed, as the reference position B₁, anddesignates one point on the right screen 43, at which the allocationregion 45 is to be provided, as the reference position B₂. Thereafter,the user can determine the allocation region 45 with a desired size by asimple operation of enlarging the allocation region 45 while scratchingon the right screen 43 with a finger, for example, with the referenceposition B₂ indicated by the pointer image P₂ on the right screen 43 asa starting point and can edit a desired combined image obtained bydrawing a desired partial image in the allocation region 45.

In addition, according to the MFP 1, since the allocation region 45 isupdated such that the locus of the designated position is included, theuser can designate the allocation region 45 only by an operation oftracing a portion that the user wants to set as the allocation region 45on the right screen 43. As a result, even when the user designates asmall region, skill of the hands is not required.

Next, a configuration for displaying a combined image on the rightscreen 43 and the left screen 44 will be described with reference toFIGS. 4A and 4D. FIG. 4A shows a first frame 61, a second frame 62, athird frame 63, and a fourth frame 64. The first frame 61 is datawritten in the first frame buffer 13 b in the RAM 13, the second frame62 is data written in the second frame buffer 13 c, the third frame 63is data written in the third frame buffer 13 d, and the fourth frame 64is data written in the fourth frame buffer 13 e (refer to FIG. 2).

The same coordinate system as the left screen 44 and the right screen 43is set for each frame, and each position in the frame is managed bycoordinate information including an x coordinate and a y coordinate.

As shown in FIG. 4A, the first frame 61 is data for displaying thepointer image P₁, and the second frame 62 is data for displaying thepointer image P₂ and a partial image 47 drawn in the allocation region45 (refer to FIGS. 3A to 3D). The third frame 63 is data for displayingthe material image 42, and the fourth frame 64 is data for displayingthe original image 41. In FIGS. 4A and 4B, the outline of the partialimage 47 is shown in a solid line in order to make the drawing easilyrecognized. However, tee solid line may not be displayed on the screen.

FIG. 4B shows an image displayed on the LCD 5 by overlapping of thefirst to fourth frames. As shown in FIG. 4B, data for display on theleft screen 44 is generated by overlapping (combining) the first andthird frames 61 and 63 such that coordinate information of the firstframe 61 and coordinate information of the third frame 63 match eachother. The first frame 61 is configured to display a transmissive colorin the entire region except for a region corresponding to the pointerimage P₁. Accordingly, by combining of the first frame 61 and the thirdframe 63, an image in which the pointer image P₁ is added to thematerial image 42 is displayed on the left screen 44.

On the other hand, data for display on the right screen 43 is generatedby combining the second frame 62 with the fourth frame 64. The secondframe 62 is configured to display a transmissive color in the entireregion except for a region corresponding to the partial image 47 and thepointer image P₂. Accordingly, by combining of the second frame 62 andthe fourth frame 64, a combined image in which the partial image 47 andthe pointer image P₂ are added to the original image 41 is displayed onthe right screen 43.

In the MFP 1, the positional relationship between the second frame 62and the fourth frame 64 is determined such that the partial image 47exactly overlaps the allocation region 45 determined on the right screen43 and overlapping of the frames is performed on the basis of thepositional relationship, and details of the processing will be describedlater.

Next, the above processing that the MFP 1 executes will be describedwith reference to FIGS. 5 to 9B. At first, an editing processing (S100)will be described with reference to FIG. 5. This editing processing(S100) is processing executed when start of editing of the combinedimage is instructed by the user, for example, by menu selection fromfunctions that the MFP 1 has.

First, it is determined whether it is selected which original image 41is to be displayed by the user and an instruction of OK is input by theuser or initialization of display of the LCD 5 is selected by the user(S1).

When the determination in step S1 is positive (S1: Yes), the first framebuffer 13 b and the second frame buffer 13 c are initialized (S2). Then,material image data is generated on the basis of photograph date andtime information read from the header of the original image data, forexample, and is copied to the third frame buffer 13 d (S4). Then, theoriginal image data, which is to be displayed, read from a memory cardon the basis of a user's instruction is copied to the fourth framebuffer 13 e (refer to FIG. 2) (S6).

Then, the first frame 61 and the third frame 63 are made to overlap eachother and are written in a region corresponding to the left screen 44 ofthe video memory 13 a, and the second frame 62 and the fourth frame 64are made to overlap each other and are written in a region correspondingto the right screen 43 of the video memory 13 a (S8). As a result, theoriginal image 41 is displayed on the right screen 43 and the materialimage 42 is displayed on the left screen 44 (refer to FIG. 3A).

On the other hand, when the determination in step S1 is negative (S1:No), it is then determined whether the reference positions B₁ and B₂ aredetermined (S9). When the determination in step S9 is negative (S9: No),the process proceeds to relationship determination processing (S11) inwhich the correspondence relationship of coordinate informationdetermined on the basis of the reference positions B₁ and B₂ and thereference positions B₁ and B₂ is determined. Details of the relationshipdetermination processing will be described later with reference to FIG.6.

On the other hand, when the determination in step S9 is positive (S9:Yes), it is then determined whether the scratch mode is selected (S10).When the determination in step S10 is positive (S10: Yes), combiningprocessing for editing the combined image is executed as described withreference to FIGS. 3A to 3D (S14), and the process returns to step S1.Details of the combining processing (S14) will be described later withreference to FIG. 7.

On the other hand, when the determination in step S10 is negative (S10:No), the move processing for moving the allocation region 45 is executed(S16), and process returns to step S1. Details of the move processing(S16) will be described later with reference to FIG. 8.

If the user inputs an instruction to end editing in a state where thecombined image is displayed on the right screen 43 of the LCD 5 whilethe editing processing (S100) shown in FIG. 5 is being executed, the MFP1 stops the editing processing (S100). Then, data corresponding to thecombined image displayed on the right screen 43 is generated on thebasis of original image data and material image data, and thereafter,the process proceeds to processing for printing or storing the generateddata. Accordingly, the user can edit the combined image while viewingthe right screen 43 and can print or store the combined image when adesired combined image is completed. That is, the right screen 43 may beused as a preview screen.

Next, the relationship determination processing (S11) will be describedwith reference to FIG. 6. The relationship determination processing isprocessing for determining the reference position B₁ of the left screen44, the reference position B₂ of the right screen 43, and thecorrespondence relationship between the left screen 44 and the rightscreen 43.

First, coordinate information indicating the designated position on theLCD 5 is acquired on the basis of a detection result of the touch panel7 (S21). Then, it is determined whether the right screen 43 is touched(S22). Here, for the convenience of explanation, a case where the MFP 1according to the present exemplary embodiment is configured such thatthe reference position B₁ of the left screen 44 is first designated bythe user will be described. Accordingly, since the right screen 43 isnot touched by the user at first, the determination in step S22 isnegative (S22: No).

However, the MFP 1 may be configured such that the reference position ofthe right screen 43 is first determined or may be configured such thatthe user can determine the reference positions in the order that theuser likes.

Then, it is determined whether the left screen is touched (S23). Whenthe determination in step S23 is negative (S23: No), the relationshipdetermination processing (S11) ends. On the other hand, when thedetermination in step S23 is positive (S23: Yes), the pointer image P₁is then written in the first frame 61 on the basis of the acquiredcoordinate information (S26). Then, the acquired coordinate informationis determined as the reference position B₁ of the left screen 44 and isstored in the reference position memory 13 g (refer to FIG. 2) (S27).

Then, the first to fourth frames 61 to 64 are made to overlap in thecombination described with reference to FIGS. 4A and 4B (S29), and theprocess ends. Since the correspondence relationship between thecoordinate information on the left screen 44 and the coordinateinformation on the right screen 43 is not set at this point of time, theframes overlap each other such that the coordinate information matcheach other. As a result, the pointer image P₁ is displayed on the leftscreen 44 of the LCD 5 as described with reference to FIG. 3B.

Then, in the relationship determination processing (S11) executedsubsequently, when the right screen 43 is touched (S22: Yes), thepointer image P₂ is written in the second frame 62 on the basis of thecoordinate information on the reference position B₁ of the left screen44 determined previously (S24). That is, the touch position on the rightscreen 43 is determined as the reference position B₂ of the right screen43, and the pointer image P₂ for displaying the pointer image P₂ thereis written in the second frame 62.

The second frame 62 for displaying the pointer image P₂ and the fourthframe 64 for displaying the original image 41 of the right screen 43 aremade to overlap each other such that one point in the second frame 62specified by the coordinate information on the reference position B₁ ofthe left screen 44 overlaps one point in the fourth frame 64 specifiedby the coordinate information on the reference position B₂ of the rightscreen 43, which will be described in detail later.

Therefore, in processing of step S24, it is assumed that the pointerimage P₂ is written at the position in the second frame 62 specified bythe coordinate information on the reference position B₁. In this manner,the frames are made to overlap such that one point in the second frame62 specified by the coordinate information on the reference position B₁of the left screen 44 overlaps one point in the fourth frame 64specified by the coordinate information on the reference position B₂ ofthe right screen 43. As a result, an image in which the pointer image P₂is disposed can be displayed at the reference position B₂ of the rightscreen 43.

Then, the acquired coordinate information is determined as the referenceposition B₂ of the right screen 43 and is stored in the referenceposition memory 13 g (refer to FIG. 2) (S25). Then, the correspondencerelationship between a position of the left screen 44 and a position ofthe right screen 43 is determined such that the reference position B₁ ofthe left screen 44 and the reference position B₂ of the right screen 43correspond to each other, and the correspondence relationship is storedin the correspondence relationship memory 13 h (refer to FIG. 2) (S28).Specifically, a difference obtained by subtracting the coordinateinformation on the reference position B₁ of the left screen 44 from thecoordinate information on the reference position B₂ of the right screen43 is determined as the correspondence relationship between the leftscreen 44 and the right screen 43 and is stored. For example, when idlecoordinate information on the reference position B₂ of the right screen43 is (100, 100) and the coordinate information on 1the referenceposition B₁ of the left screen 44 is (20, 50), the difference (80, 50)is determined as the correspondence relationship. Hereinafter, thecoordinate information (difference) for matching the reference positionof the left screen 44 with the reference position of the right screen 43is described as the ‘correspondence relationship’.

Then, the first to fourth frames 61 to 64 are made to overlap in thecombination described with reference to FIGS. 4A and 4B (S29), and theprocess ends.

At this point of time, the correspondence relationship between thecoordinate information on the left screen 44 and the coordinateinformation on the right screen 43 is already set. Accordingly, thesecond frame 62 and the fourth frame 64 overlap each other according tothe correspondence relationship (difference) stored in thecorrespondence relationship memory 13 h.

For example, if the difference is (80, 50), the second frame 62 and thefourth frame 64 overlap each other in such a positional relationshipthat the origin of the second frame 62 matches the coordinateinformation (80, 50) of the fourth frame 64. In his manner, the secondframe 62 and the fourth frame 64 overlap each other such that one pointof the second frame 62 specified by the coordinate information (forexample, (20, 50)) on the reference position B₁ of the left screen 44overlaps one point of the fourth frame 64 specified by the coordinateinformation on the reference position B₂ of the right screen 43. On theother hand, the first frame 61 and the third frame 63 overlap each othersuch that coordinate information on the first frame 61 matchescoordinate information on the third frame 63. As a result on the LCD 5,the pointer image P₁ is displayed at the reference position B₁ of theleft screen 44 and the pointer image P₂ is displayed at the referenceposition B₂ of the right screen 43 as described with reference to FIG.3C.

Then, in combining processing (S14) executed after the relationshipdetermination processing (S11), the processing is performed whilemaintaining the positional relationship between the second frame 62 andthe fourth frame 64.

FIG. 7 is a flow chart showing the combining processing (S14) executedby the MFP 1. In the combining processing (S14), a touch position(designated position) detected by the touch panel 7 is first acquired(S702). Then, it is determined whether the right screen 43 of the LCD 5is touched (operated by the user) on the basis of the acquired touchposition (S704). When the determination in step S704 is positive (S704:Yes), coordinate information (xr, yr) indicating the touch position onthe right screen 43 is then calculated on the basis of the touchposition and the allocation region 45 (refer to FIGS. 3A to 3D), whichis a circular region having a radius of A dots (region obtained bygiving a predetermined width to the designated position) with a positionindicated by the coordinate information (xr, yr) as a center, isdetermined (S705).

Then, the cut region 46 (refer to FIGS. 3A to 3D) of the left screen 44corresponding to the allocation region 45 is determined on the basis ofthe correspondence relationship determined by the relationshipdetermination processing (refer to FIG. 6) (S706). For example, thecoordinate information that specifies the cut region 46 can be acquiredby subtracting the correspondence relationship (difference) stored inthe correspondence relationship memory 13 h from the coordinateinformation that specifies the allocation region 45.

Then, data of pixels included in the cut region 46 is read from thethird frame 63 and is copied to the second frame 62 as data of pixelsincluded in the partial image 47 (S707). In addition, data fordisplaying the pointer image P₁ at the position of the left screen 44corresponding to the position indicated by the coordinate 30 information(xr, yr) is written in the first frame (S708). In this manner, aposition of the left screen 44 corresponding to a designated position ofthe right screen 43 is shown by the pointer image P₁. Accordingly, sincethe user can view the position of the left screen 44 corresponding tothe position that the user has designated on the right screen 43, theuser can easily perform an operation for determining the allocationregion 45 in subsequent operations.

Then, it is determined whether a display update time set beforehand haselapsed (S710). When the determination in step S710 is positive (S710:Yes), the first frame 61 and the third frame 63 are made to overlap eachother and are written in a region corresponding to the left screen 44 ofthe video memory 13 a, and the second frame 62 and the fourth frame 64are made to overlap each other in the positional relationship based onthe correspondence relationship stored in the correspondencerelationship memory 13 h and are written in a region corresponding tothe right screen 43 of the video memory 13 a (S712). As a result, thecombined image described with reference to FIG. 3D is displayed on theright screen 43. On the other hand, when the determination in step S710is negative (S710: No), processing of step S712 is skipped to proceed toprocessing of step S714.

Then, it is determined whether the user instructs to end the combiningprocessing (S14) (S714). This is determined on the basis of whether endof editing is input by the user, for example. When the determination instep S714 is negative (S714: No), the process returns to step S702 torepeat the processing. As a result, the allocation region 45 issequentially updated according to a user's change of designated positionand the display of the material image 42 in the allocation region 45 isupdated on the basis of the updated allocation region 45, such that thecombined image is updated. Since such an update of display was describedin detail with reference to FIGS. 3A to 3D, a detailed explanationthereof will be omitted.

When the determination in step S714 is positive (S714: Yes) whilerepeating the processing, the combining processing (S14) ends. Accordingto the combining processing, a combined image in which a partial imagecut from the material image 42 is drawn in the allocation region 45determined by a user's operation can be displayed on the right screen43.

Next the move processing (S16) will be described with reference to FIG.8. The move processing (S16) is processing for making the user designatea change portion reference position and a position after change, andmove the allocation region 45. The move processing is executed insetting a move mode. However, even when setting the move mode, theprocessing is omitted in a state where the partial image 47 is notdisplayed on the right screen 43, that is, when display of a combinedimage based on the combining processing is not performed. Thecorrespondence relationship set when performing combining display of thepartial image 47 is stored in the correspondence relationship memory 13h.

First, a touch position (designated position) detected by the touchpanel 7 is acquired (S41). Then, it is determined whether the rightscreen 43 of the LCD 5 is touched (operated by the user) on the basis ofthe acquired touch position (S42). When the determination in step S42 isnegative (S42: No), the process ends.

On the other hand, when the determination in step S42 is positive (S42:Yes), it is then determined whether the change portion referenceposition is determined (S46). Since the determination is negative (S46:No) at first, the number of times of touch (that is, the number of timesof touch on the same place) is determined (S47). When the number oftimes of touch is determined to be ‘2n−1’ times (‘n’ is one or moreintegers) (S47: ‘2n−1’ times), the pointer image P₂ is written in thesecond frame 62 on the basis of the touch position (S52). Moreover, inthe processing of step S52, the second frame 62 and the fourth frame 64are made to overlap each other according to the correspondencerelationship stored in the correspondence relationship memory 13 h(refer to FIG. 4B). Accordingly, the coordinate information on the touchposition on the right screen 43 is converted into the coordinateinformation on the second frame 62 according to the correspondencerelationship, and the pointer image P₂ is written in the second frame 62on the basis of the converted coordinate information.

Then, the first frame 61 and the third frame 63 are made to overlap eachother and are written in a region corresponding to the left screen 44 ofthe video memory 13 a, and the second frame 62 and the fourth frame 64are made to overlap each other in the positional relationship based onthe correspondence relationship stored in the correspondencerelationship memory 13 h and are written in a region corresponding tothe right screen 43 of the video memory 13 a (S53). In this way, thepointer image P₂ is displayed at the touch position of the right screen43.

On the other band, when the number of times of touch is determined to be‘2n’ times (S47: ‘2n’ times), the pointer image P₂ is written in thesecond frame 62 on the basis of the touch position (S48). Then, thecoordinate information on the touch position is stored, as the changeportion reference position of the right screen 43, in the referenceposition memory 13 g (refer to FIG. 2) (S49). Then, the first to fourthframes 61 to 64 are made to overlap and are written in the video memory13 a (S53). In this way, the pointer image P₂ is displayed at the touchposition of the right screen 43.

A state before the position of an allocation region is changed is shownin FIG. 9A. As shown in FIG. 9A, the pointer image P₂ is made to onlymove when the touch is performed ‘2n−1’ times, but the change portionreference position is determined in addition to the movement of thepointer image P₂ when the touch is performed ‘2n’ times. Accordingly,for example, the user can display the pointer image P₂ by singleclicking and designate a desired change portion reference position bydouble clicking if it is determined that a desired position can bedesignated.

In addition, a display color of the pointer image P₂ may be changed whenthe change portion reference position is determined. In this case, theuser can see that the change portion reference position is determined

Referring back to FIG. 8, the explanation continues. When the changeportion reference position is determined as described above, thedetermination in step S46 becomes positive (S46: Yes). Then, the pointerimage P₂ is written in the second frame 62 on the basis of the touchposition (S50). Then, the touch position is set as a position afterchange, and the movement amount of the second frame 62 is determinedsuch that the second frame 62 moves, by the distance from the changeportion reference position determined previously to the position afterchange, with respect to the fourth frame 64 (S51). Specifically, a valueobtained by subtracting the coordinate information on the change portionreference position from the coordinate information on the position afterchange is calculated as the movement amount of the second frame 62. Thatis, although the reference positions B₁ and B₂ of the left screen 44 andthe right screen 43 are determined by the relationship determinationprocessing (S11) and the second frame 62 and the fourth frame 64 aremade to overlap each other according to the correspondence relationshipbased on the reference positions B₁ and B₂, the positional relationshipbetween the second frame 62 and the fourth frame 64 in the overlappingis changed by moving the second frame 62 by the movement amountcalculated as described above.

Then, the second fame 62 and the fourth frame 64 are made to overlap inthe positional relationship based on the movement amount of the secondframe 62 determined in the processing of step S51 and are written in thevideo memory 13 a (S53).

A state after the position of the allocation region 45 is changed isshown in FIG. 9B. As shown in FIG. 9B, according to the move processing(S16), the partial image 47 already displayed on the right screen 43 ismoved to the position after change designated by a user's operationwhile maintaining the shape and size by changing the positionalrelationship between the second frame 62 and the fourth frame 64. Thus,the user can easily edit the combined image displayed on the LCD 5.

In addition, although the user designates the change portion referenceposition and the position after change in the move processing (S16),only the position after change may be designated.

In this case, for example, a configuration where a reference point(central point) existing in a partial image is set beforehand and thepartial image is moved such that the reference point matches a position,to which the partial image is to be moved, designated by the user may beadopted.

While the present invention has been shown and described with referenceto certain exemplary embodiments thereof, it will be understood by thoseskilled in the art that various changes in form and details may be madetherein without departing from the spirit and scope of the invention asdefined by the appended claims.

For example, in the MFP 1 according to the above-described exemplaryembodiment, the partial image 47 cut from the material image 42 iscombined in the original image 41 with the magnification of 100%.Therefore, the MFP 1 according to the above-described exemplaryembodiment is configured such that a suitable region in the originalimage 41 can be designated as a position, at which the partial image 47is to be combined, while viewing the material image 42 with the samedisplay magnification as the partial image 47 combined in the originalimage 41.

However, the present invention is not limited to the case where thepartial image 47 is combined with the same magnification, but thepartial image 47 may be combined in the original image 41 in a statewhere the partial image 47 is enlarged or reduced.

First Modified Embodiment

A relationship determination processing (S110) according to a firstmodified embodiment will be described with reference to FIG. 10. Therelationship determination processing (S110) shown in FIG. 10 isprocessing executed instead of the relationship determination processing(S11; refer to FIG. 6) described in the above exemplary embodiment. Inaddition, the same portions as in the relationship determinationprocessing (S11) described in the above exemplary embodiment are denotedby the same reference numerals, and an explanation thereof will beomitted.

In the relationship determination processing (S110) in the firstmodified embodiment, a user is made to designate a reference positionand a size regulation position on each of the left screen 44 and theright screen 43. Similar to the above-described exemplary embodiment,first, a reference position and a size regulation position aredesignated on the left screen 44 and then a position is designated onthe right screen 43,

In the relationship determination processing (S110) in the firstmodified embodiment, when the left screen 44 is touched (S23), it isdetermined tie number of times of touch (S111). When the number of timesof touch is ‘2n’ times (S11: ‘2n’ times), the designated position isdetermined as the reference position B₁ and is stored in the referenceposition memory 13 g (refer to FIG. 2) (S26 and S27).

On the other hand, when the number of times of touch is ‘2n−1’ times(S111: ‘2n−1’ times), a pointer image P₃ is written in the first frame61 on the basis of coordinate information on the designated position(S112). Then, the position is determined as a size regulation positionS₁ of the left screen 44 and the coordinate information is stored in theRAM 13 (refer to FIG. 2) (S113).

Then, the first to fourth frames 61 to 64 are made to overlap in thecombination described with reference to FIGS. 4A and 4B (S29), and theprocess ends. In addition, since the correspondence relationship betweenthe coordinate information on the left screen 44 and the coordinateinformation on the right screen 43 is not set at this point of time, theframes overlap each other such that the coordinate information matcheach other.

As shown in FIGS. 11A and 11B, when the reference position B₁ and thesize regulation position S₁ of the left screen 44 are determined by auser's operation, the pointer image P₁ is displayed at the referenceposition B₁ and the pointer image P₃ is displayed at the size regulationposition Si.

Referring back to FIG. 10, the explanation continues. Then, when theright screen 43 is touched (S23: Yes), the number of times of touch isdetermined (S114). When the number of times of touch is ‘2n’ times(S114: ‘2n’ times), the pointer image P₂ is written in the second frame62 (S24). Then, the acquired coordinate information is determined as tiereference position B₂ of the right screen 43 and is stored in thereference position memory 13 g (refer to FIG. 2) (S25).

Then, the correspondence relationship between each position of the leftscreen 44 and each position of the right screen 43 is determined suchthat the reference position B₁ of the left screen 44 and the referenceposition B₂ of the right screen 43 correspond to each other, and thecorrespondence relationship is stored in the correspondence relationshipmemory 13 h (refer to FIG. 2) (S28).

Then, the first to fourth frames 61 to 64 are made to overlap in thecombination described with reference to FIGS. 4A and 483 (S29), and theprocess ends. In addition, since the correspondence relationship betweenthe coordinate information on the left screen 44 and the coordinateinformation on the right screen 43 is already determined at this pointof time, the second fame 62 and the fourth frame 64 overlap each otherin the positional relationship corresponding to the determinedcorrespondence relationship.

On the other hand, when the number of times of touch is ‘2n−1’ times(S114: ‘2n−1’ times), a pointer image P₄ is written in the second frame62 (S115). In addition, at the point of time when the processing of stepS115 is performed, the second frame 62 and the fourth frame 64 are madeto overlap each other according to the correspondence relationshipdetermined in the processing of step S28. Therefore, the coordinateinformation on the touch position on the right screen 43 is convertedinto the coordinate information on the second frame 62 according to thecorrespondence relationship, and the pointer image P₄ is written at aposition specified by the coordinate information. Then, the positiontouched ‘2n−1’ times by the user is determined as the size regulationposition S₂ of the right screen 43 and the coordinate information isstored in the RAM 13 (refer to FIG. 2) (S116).

Then, the magnification applied to a partial image is determinedaccording to the size relationship between a distance from the referenceposition B₁ to the size regulation position S₁ on the left screen 44 anda distance from the reference position B₂ to the size regulationposition S₂ on the right screen 43 (S117).

Specifically, the magnification is determined in the followingexpression, for example.

Magnification=(X _(S2) −X _(S2))/(X _(S1) −X _(B1))   (Expression)

Here, (X_(S2)−X_(S2)) is a value obtained by subtracting an x coordinateof the reference position B₂ from an x coordinate of the size regulationposition S₂ of the right screen 43, and (X_(S1)−X_(S1)) is a valueobtained by subtracting an x coordinate of the reference position B₁from an x coordinate of the size regulation position S₁ of the leftscreen 44.

Then, the first to fourth frames 61 to 64 are made to overlap in thecombination described with reference to FIGS. 4A and 4B (S29), and theprocess ends.

As shown in FIG. 11C, when the reference position 32 and the sizeregulation position S₂ of the right screen 43 are determined, thepointer image P₂ is displayed at the reference position B₂ and thepointer image P₄ is displayed at the size regulation position S₁. Asdescribed above, since the magnification of the partial image 47 isdetermined by the distance between the reference position and the sizeregulation position, the user can intuitively see the determinedmagnification from a distance between the pointer images on the leftscreen 44 and a distance between the pointer images on the right screen43.

As shown in FIGS. 11D and 11E, if the horizontal distance between thereference position B₂ and the size regulation position S₂ can benarrowed by redesignating the size regulation position S₂ only on theright screen 43, for example, the magnification of the partial image 47can be made smaller according to the above expression.

Although the partial image 47 is drawn in the second frame 62 with thesame magnification in the combining processing (S14; refer to FIG. 7)executed in the above exemplary embodiment, as shown in FIG. 11F, thepartial image 47 is enlarged or reduced with the magnificationdetermined in the processing of step S117 and is drawn in the secondframe 62 in the combining processing executed after the relationshipdetermination processing (S110) in this first modified embodiment.However, since the combining processing in this first modifiedembodiment is similar to the combining processing (S14; refer to FIG. 7)in the above exemplary embodiment except that the magnification ischanged, illustration and detailed explanation thereof will be omitted.

As shown in FIG. 11F, according to the first modified embodiment, acombined image in which the enlarged or reduced partial image 47 isdrawn in the allocation region 45 can be displayed on the right screen43 with the magnification determined in the processing of step S117.

Accordingly, the user can obtain a combined image in which the desiredpartial image 47 is automatically enlarged or reduced according to thesize of the allocation region 45, for example, by an operation ofdesignating the desired size of the allocation region 45 by thereference position B₂ and the size regulation position S₂ and ofdesignating the partial image 47 that the user wants to include in theallocation region 45 by the reference position B₁ and the sizeregulation position S₁.

Furthermore, in this first modified embodiment, the magnification isdetermined on the basis of the horizontal distance between the referenceposition and the size regulation position on the LCD 5. However, forexample, the magnification may also be determined on the basis of thevertical distance between the reference position and the size regulationposition when the material image 42 is configured to include verticallywritten characters.

Second Modified Embodiment

A move processing (S160) in a second modified embodiment will bedescribed with reference to FIG. 12. The move processing (S160) in thesecond modified embodiment is processing executed instead of the moveprocessing (S16) in the exemplary embodiment described above. Similar tothe move processing (S16) in the above exemplary embodiment, the moveprocessing (S160) in the second modified embodiment is executed when theallocation region 45 where the partial image 47 is displayed isdisplayed on the right screen 43. Therefore, also in this case, thecorrespondence relationship set when performing combining display of thepartial image 47 is stored in the correspondence relationship memory 13h.

First, a touch position (designated position) detected by the touchpanel 7 is acquired (S161). Then, it is determined whether the rightscreen 43 of the LCD 5 is touched (operated by the user) on the basis ofthe acquired touch position (S162).

When the determination in step S162 is positive (S162: Yes), the numberof times of touch is then determined (S164). When the number of times oftouch is determined to be ‘2n−1’ times (S164: ‘2n−1’ times), the pointerimage P₂ is written in the second frame 62 on the basis of thecoordinate information (S165). That is, at the point of time when theprocessing of step S165 is executed, the second frame 62 and the fourthframe 64 are made to overlap each other according to the correspondencerelationship stored in the correspondence relationship memory 13 h,thereby forming the combined image displayed on the right screen 43.Therefore, the coordinate information on the touch position on the rightscreen 43 is converted into the coordinate information on the secondframe 62 according to the correspondence relationship, and the pointerimage P₂ is written at a position specified by the coordinateinformation

Then, the pointer image P₁ is written at a corresponding position of theleft screen 44 corresponding to the pointer image P₂ (S168). Asdescribed above, the reference position B₁ of the left screen 44 isdetermined, the reference position B₂ of the right screen 43 isdetermined, and the correspondence relationship is stored in thecorrespondence relationship memory 13 h. Accordingly, in the processingof step S168, coordinate information specifying the position at whichthe pointer image P₁ is to be written is calculated such that theposition of the pointer image P₂ with respect to the reference positionB₂ of the right screen 43 and the position of the pointer image P₁ withrespect to the reference position B₁ of the left screen 44 match eachother, and the pointer image P₁ is written in the first frame 61according to the coordinate information. Then, the process proceeds toprocessing of step S172.

On the other hand, when the number of times of touch is determined to be

‘2n’ times (S164: ‘2n’ times), the pointer image P₂ is written in thesecond frame 62 on the basis of the coordinate information (S166).Similar to those described in the processing of step S165, also at thepoint of time when the processing of step S166 is executed, the pointerimage P₂ is written at a position in the second frame 62 specifiedaccording to the correspondence relationship stored in thecorrespondence relationship memory 13 h.

Then, the coordinate information is stored, as a fixed referenceposition of the right screen 43, in the reference position memory 13 g(refer to FIG. 2) (S167). Then, the pointer image P₁ is written at aposition of the first frame 61 corresponding to the pointer image P₂(S168).

Then, the first to fourth frames 61 to 64 are made to overlap and arewritten in the video memory 13 a (S172). In this manner, the pointerimage P₂ is displayed at the touch position of the right screen 43, andthe pointer image P₁ is displayed at the position of the left screen 44corresponding to the touch position of the right screen 43.

In the second modified embodiment, as shown in FIG. 13A, at first, thepointer images P₁ and P₂ indicating the reference positions B₁ and B₂are displayed on the left screen 44 and the right screen 43,respectively.

Then, as shown in FIG. 13B, when the pointer image P₂ on the rightscreen 43 is double-clicked (that is, when the pointer image P₂ on theright screen 43 is touched ‘2n’ times), for example, the designatedposition is determined as a fixed reference position. In addition, adisplay color of the pointer image P₂ may be changed when the fixedreference position is determined.

Referring back to FIG. 12, the explanation continues. When thedetermination in step S162 is negative (S162: No), it is then determinedwhether the left screen 44 is touched (S163). When the determination instep S163 is negative (S163: No), the process ends.

On the other hand, when the determination in step S163 is positive(S163: Yes), the pointer image P₁ is written at a position in the firstfame 61 specified by the coordinate information on the touch position onthe left screen 44 (S169). Then, the touch position is set as the newreference position B₁ of the left screen 44, and the correspondencerelationship between the left screen 44 and the right screen 43 isupdated such that the new reference position B₁ corresponds to thedetermined fixed reference position (display position of the pointerimage P₂) on the right screen 43 (S170).

Then, the cut region 46 on the left screen 44 corresponding to theallocation region 45 displayed on the right screen 43 is redetermined onthe basis of the correspondence relationship updated in the processingof step S170, and the partial image 47 cut in the redetermined cutregion 46 is copied to the second frame 62 (S171).

Then, the second frame 62 and the fount frame 64 are made to overlap inthe positional relationship according to the correspondence relationshipupdated in the processing of step S170 and are written in the videomemory 13 a (S172). As a result, a combined image, in which the partialimage 47 in the redetermined out region 46 is drawn in the allocationregion 45 displayed on the right screen 43, is displayed on the rightscreen 43.

As shown in FIG. 13C, according to the move processing (S160) in thesecond modified embodiment, an image in which the position and shape ofthe allocation region 45 are not changed and only the partial image 47drawn within the allocation region 45 is changed according to a user'soperation on the left screen 44 is displayed. Thus, the user can easilyedit the combined image displayed on the LCD 5 by execution of the moveprocessing (S160) in the second modified embodiment.

Third Modified Embodiment

A move processing (S180) according to a third modified embodiment willbe described with reference to FIG. 14. The move processing (S180)according to the Third modified embodiment is processing executedinstead of the move processing (S16) in the exemplary embodimentdescribed above. In the move processing (S180) according to the thirdmodified embodiment, a user starts an operation from the left screen 44at first. Furthermore, similar to the move processing (S116) in theabove exemplary embodiment, the move processing (S180) in the secondmodified embodiment is executed when the allocation region 45 where thepartial image 47 is displayed is displayed on the right screen 43.Therefore, also in this case, the correspondence relationship set whenperforming combining display of the partial image 47 is stored in thecorrespondence relationship memory 13 h and the reference position B₁determined on the left screen 44 and the reference position B₂determined on the right screen 43 are stored in the reference positionmemory 13 g.

First, a touch position (designated position) detected by the touchpanel 7 is acquired (S181). Then, it is determined whether the rightscreen 43 of the LCD 5 is touched (operated by the user) on the basis ofthe acquired touch position (S182). At first, the determination in stepS182 is negative (S182: No). Then, it is determined whether the leftscreen 44 is touched (S185).

When the determination in step S185 is negative (S1 85: No), the processends. On the other hand, when the determination in step S185 is positive(S185: Yes), the number of times of touch on the designated position isdetermined (S186). When the number of times of touch is ‘2n−1’times(S186 ‘2n−1’ times), the process proceeds to processing of step S189. Inthe processing of step S189, the pointer image P₁ is written in thefirst frame 61 on the basis of the coordinate information on thedesignated position (S189). Then, the first to fourth frames 61 to 64are made to overlap and are written in the video memory 13 a (S190). Inthis way, the pointer image P₁ is displayed at the touch position on theleft screen 44.

On the other hand, when the number of times of touch is ‘2n’ times(S186: ‘2n’ times), the coordinate information on the designatedposition is determined as a fixed reference position of the left screen44 and is stored in the reference position memory 13 g (S187). Then, thecorrespondence relationship is determined such that the fixed referenceposition of the left screen 44 and the reference position B₂ of theright screen 43 stored in the reference position memory 13 g correspondto each other, and the correspondence relationship is stored in thecorrespondence relationship memory 13 h (refer to FIG. 2) (S188). Then,the process proceeds to processing of step S189.

In the third modified embodiment, as shown in FIG. 15A, at first, thepointer images P₁ and P₂ indicating the reference positions B₁ and B₂are displayed on the left screen 44 and the right screen 43,respectively.

As shown in FIG. 15B, when the pointer image P₂ on the left screen 44 isdouble-clicked (that is, the pointer image P₂ on the left screen 44 istouched ‘2n’ times), the position of the pointer image P₂ is determinedas a fixed reference position. A display color of the pointer image P₁may be changed when the fixed reference position has been determined.

Referring back to FIG. 14, die explanation continues. When thedetermination in step S182 is positive (S182: Yes), the touch positionis set as a position after change of the allocation region 45. Inaddition, when moving the allocation region 45 determined previously bythe distance from the reference position B₂ indicated by the pointerimage P₂ to the position after change, the cut region 46 correspondingto the allocation region 45 after the position change is redeterminedand the partial image 47 cut by the cut region 46 is copied to thesecond frame 62 (S183). That is, the coordinate information on the cutregion 46 corresponding to the allocation region 45 after the positionchange is calculated on the basis of the correspondence relationshipdetermined in the processing of step S188, and the partial image 47 cutby the cut region 46 is copied to a range specified by the coordinateinformation in the second flame 62. Then, the movement amount of thesecond fame 62 is determined such that the second frame 62 moves withrespect to the fourth frame 64 by an amount corresponding to themovement amount of the allocation region 45 (S184).

Then, the second frame 62 and the fourth frame 64 are made to overlapeach other in a state where the positional relationship between thesecond frame 62 and the fourth frame 64 is changed by moving the secondframe 62 by the movement amount determined in the processing of stepS184 and are written in the video memory 13 a (S190).

As shown in FIG. 15C, according to the move processing (S180) in thethird modified embodiment, the position of the allocation region 45 ischanged on the basis of a user's operation, and the cut region 46corresponding to the allocation region 45 is redetermined and thepartial image 47 of the material image 42 in the redetermined cut region46 is drawn in the allocation region 45 after position change.Accordingly, the user can change the combined image with a sense likesliding only the allocation region 45 in a state where the materialimage 42 on the back surface side stays unchanged.

Four Modified Embodiment

FIG. 16 is a flow chart showing combining processing (S140) in a fourthmodified embodiment. The combining processing (S340) in the fourthmodified embodiment is processing, in which the second frame 62 isprepared in a plural number when the plurality of allocation regions 45are set on the right screen 43, and is executed instead of the combiningprocessing (S14) in the exemplary embodiment described above,

Although a detailed explanation is omitted, a table that individuallymanages the relative positional relationship between the fourth frame 64and each of the second frames 62 is set in the RAM 13. In the combiningprocessing (S140) in the modified embodiment, the same processing as inthe combining processing (S14) in the above-described exemplaryembodiment is denoted by the same reference numeral, and an explanationthereof will be omitted.

First, it is determined whether the allocation region 45 is alreadydisplayed on the right screen 43 (S141). When the determination in stepS141 is negative (S141: 15 No), the second frame buffer 13 c preparedbeforehand in the RAM 13 is set as a storage region of a second framefor work (S148).

On the other hand, when the determination in step S141 is positive(S141: Yes), a new region is prepared in the RAM 13 and the region isset as a storage region (not shown) of a second frame for work (S142).Then, the pointer image P₂ written in the second frame other than thesecond frame for work is changed to ineffective display, for example, bysetting a gray color as the display color (S143).

FIG. 17A shows an example of a screen displayed on the LCD 5corresponding to the processing of steps S142 and S143 in the combiningprocessing (S140) according to the fourth modified embodiment.

As shown in FIG. 17A, when the allocation region 45 is already displayedon the right screen 43, the MFP 1 prepares a second frame for work fordisplaying the pointer image P₂ indicating a new designated position andchanges the display color of the pointer image P₂ displayed originallyto thereby make the pointer image P₂ ineffective.

Referring back to FIG. 16, the explanation continues. Then, coordinateinformation is acquired (S144), and it is determined whether a touch onthe right screen 43 is detected (S145). When the determination in stepS145 is negative (S145: No), the process ends. On the other hand, whenthe determination in step S145 is positive (S145: Yes), the designatedposition is set as the new reference position B₂ of the right screen 43,the correspondence relationship between the right screen 43 and the leftscreen 44 is determined on the basis of the new reference position B₂,and the new pointer image P₂ is drawn at a position corresponding to thedesignated position of the second frame for work (S146). In addition,when a plurality of second frames are set, the correspondencerelationship is stored for every second frame.

FIG. 17B shows an example of a screen where the pointer image P₂ isdisplayed on the newly determined reference position B₂. In this case,only the newly displayed pointer image P₂ is effective.

Referring back to FIG. 16, the explanation continues. Then, similar tothe exemplary embodiment described above, coordinate information isacquired (S702) and it is determined whether a touch on the right screen43 is detected (S704). When the determination in step S704 is negative(S704: No), the process returns to step S702 to repeat the processing.

On the other hand, when the determination in step S704 is positive(S704: Yes), the allocation region 45 having the designated position asa center is determined (S705) and the cut region 46 corresponding to theallocation region 45 is determined (S706) similar to the combiningprocessing (S14) in the exemplary embodiment described above. Moreover,in the processing of step S706, the cut region 46 is determined on thebasis of the newest correspondence relationship determined in theprocessing of step S147.

Then, the partial image 47 cut by the cut region 46 is copied to thesecond frame for work (S147). In the combining processing (S14) in theexemplary embodiment described above, the partial image 47 is drawn inthe second frame stored in the second frame buffer 13 c. However, thecombining processing (S140) in this fourth modified embodiment isdifferent from the combining processing (S14) in the above exemplaryembodiment in that the partial image 47 is drawn in the second frame forwork.

Then, the same processing as in the above exemplary embodiment isperformed (S708 and S710) so that the first to fourth frames are made tooverlap in the combination described with reference to FIGS. 4A and 4Band are written in the video memory 13 a (refer to FIG. 2) (S150). Here,in the combining processing (S140) in this fourth modified embodiment,all of the second frames generated by then are made to overlap thefourth frame 64, which is different from the combining processing (S14)in the exemplary embodiment described above. In addition, while aninstruction to end editing is not inputted, processing from step S702 isrepeated.

FIG. 17C shows a state where a partial image is drawn in the newallocation region 45. As shown in FIG. 17C, a partial image of a cutregion based on the correspondence relationship newly determined by theprocessing of step S146 is displayed in the new allocation region 45.

FIG. 17D shows a display state after the combining processing ends. Asshown in FIG. 17D, a plurality of independent partial images can becombined on the right screen 43. Here, since the partial images aredrawn in the corresponding individual second frames as described above,only a desired partial image can be moved with respect to the originalimage 41. The movement of a partial image is realized by the moveprocessing of FIG. 8 described previously.

FIG. 17E shows an example of move processing. As shown in FIG. 17E, whenone pointer image P₂ is designated, the designated pointer image P₂ andonly a second frame in which the pointer image P₂ is drawn are madeeffective. Then, when one point on the right screen 43 is designated,the second frame made effective is moved by a distance from theeffective pointer image P₂ to the designated one point with respect tothe fourth fame.

FIG. 17F shows an example of a display state after movement of thepartial image 47. As shown in FIG. 17F, only the partial image 47specified by the effective pointer image P₂ moves and the other partialimages 47 do not move. As a result, the user can edit the combined imagemore freely.

1. An image processing apparatus comprising: a first display unit whichdisplays a material image in a first area on a display device anddisplays an original image in a second area on the display device; adetection unit which detects a position on the display device designatedfrom an outside; a relationship determining unit which sets a designatedposition in the first area detected by the detection unit as a firstreference position, and sets a designated position in the second areadetected by the detection unit as a second reference position, and whichdetermines a correspondence relationship between each position in thefirst area and each position in the second area such that the firstreference position and the second reference position correspond to eachother; an allocation region determining unit which determines anallocation region in the second area based on a detection result of thedetection unit; a cut region determining unit which determines a cutregion in the first area to correspond to the allocation regiondetermined by the allocation region determining unit based on thecorrespondence relationship determined by the relationship determiningunit; and a second display unit which displays a partial image cut fromthe material image based on the cut region determined by the cut regiondetermining unit in the allocation region determined by the allocationregion determining unit to display a combined image.
 2. The imageprocessing apparatus according to claim 1, wherein the allocation regiondetermining unit determines a region obtained by adding a width to adesignated position in the second area detected by the detection unit,as the allocation region, and updates the allocation region to include alocus of the designated position when the designated position detectedby the detection unit is moved, and wherein the second display unitupdates a display of the combined image based on the updated allocationregion as the allocation region is updated by the allocation regiondetermining unit.
 3. The image processing apparatus according to claim1, further comprising: a first area position determining unit whichdetermines a position in the first area corresponding to the designatedposition in the second area based on the correspondence relationshipdetermined by the relationship determining unit; and a mark display unitwhich displays a mark indicating the position determined by the firstarea position determining unit, in the first area.
 4. The imageprocessing apparatus according to claim 1, fiuxher comprising: a firstarea size regulating unit which determines a position in the first area,at which a predetermined operation is performed, as a first sizeregulation position of the first area; and a second area sizedetermining unit which determines a position in the second area, atwhich a predetermined operation is performed, as a second sizeregulation position of the second area, wherein the relationshipdetermining unit determines a magnification applied to the partial imagebased on a relationship between a first distance from the firstreference position to the first size regulation position in the firstarea and a second distance from the second reference position to thesecond size regulation position in the second area, and wherein thesecond display unit displays the partial image, a size of which isreduced or enlarged according to the magnification determined by therelationship determining unit, in the allocation region.
 5. The imageprocessing apparatus according to claim 4, wherein the relationshipdetermining unit determines the magnification based on the relationshipbetween the first distance and the second distance in one direction. 6.The image processing apparatus according to claim 1, further comprising:a partial image moving unit which when the detection unit detects that aposition in the second area is designated from an outside in a statewhere the partial image is displayed in the allocation region of thesecond area, moves the displayed partial image to the designatedposition while maintaining a shape and a size of the partial image. 7.The image processing apparatus according to claim 1, further comprising:a relationship updating unit which sets, as a new reference position ofthe first area, a designated position in the first area detected by thedetection unit in a state where the partial image is displayed in theallocation region, and updates the correspondence relationship such thatthe new reference position corresponds to the second reference positionof die second area; and a cut region redetermining unit whichredetermines a cut region in the first area to correspond to theallocation region based on the correspondence relationship updated bythe relationship updating unit, wherein the second display unit displaysa partial image cut from the material image based on the cut regionredetermined by the cut region redetermining unit in the allocationregion.
 8. The image processing apparatus according to claim 1, furthercomprising: an allocation position changing unit which changes aposition of the allocation region based on a designated position in thesecond area detected by the detection unit in a state where the partialimage is displayed in the allocation region; and a cut regionredetermining unit which redetermines a cut region in the first area tocorrespond to the allocation region, the position of which is changed bythe allocation position changing unit, based on the correspondencerelationship determined by the relationship determining unit, whereinthe second display unit displays a partial image cut from the materialimage based on the cut region redetermined by the cut regionredetermining unit in the allocation region, the position of which ischanged.
 9. The image processing apparatus according to claim 1, whereinthe second display unit displays an image based on data obtained bycombining an original image layer corresponding to the original imagewith a partial image layer corresponding to the partial image, in thesecond area, the image processing apparatus further comprising amanaging unit which, when a plurality of partial image layers areprovided, manages a positional relationship between the original imagelayer and each of the partial image layers individually.
 10. Acomputer-readable medium having a computer program stored thereon andreadable by a computer including a detection unit which detects aposition on a display device designated from an outside, the computerprogram, when executed by the computer, causing the computer to performoperations comprising: displaying a material image in a first area onthe display device, and displaying an original image in a second area onthe display device; setting a designated position in the first areadetected by the detection unit as a first reference position, andsetting a designated position in the second area detected by thedetection unit as a second reference position; determining acorrespondence relationship between each position in the first area andeach position in the second area such that the first reference positionand the second reference position correspond to each other; determiningan allocation region in the second area based on a detection result ofthe detection unit; determines a cut region in the first area tocorrespond to the allocation region based on the correspondencerelationship; and displaying a partial image cut from the material imagebased on the cut region, in the allocation region to display a combinedimage.